<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Document</title>
    <style>
        html,body{
            background-color: #8e8e8e;
        }
        .ui-content-wapper{
            margin: 100px auto;
            overflow: hidden;
        }
        .ui-content-box{
            width: 350px;
            height: 250px;
            float: left;
            margin: 0 20px;
            position: relative;
            border-radius: 10px;
            cursor: pointer;
        }
        .ui-content-box img{
            display: block;
            width: 100%;
            height: 100%;
            border-radius: 10px;
        }
        .ui-content-box:hover::after{
            left: 35px;
            right: 35px;
            bottom: 35px;
            top: 35px;
            opacity: 0.5;
            animation: show 1s ease-in forwards;
            border-radius: 10px;
        }
        .ui-content-box::after{
            opacity: 0;
            content: '';
            background-color: #000;
            position: absolute;
            left: 0;
            top: 0;
            right: 0;
            bottom: 0;
            transition: all 0.3s ease 0.1s;
        }
        @keyframes show{
            25%,50%,75%,100%{ transform:translateX(0); }
		    40%{ transform:translateX(15px); }
		    70%{ transform:translateX(10px); }
		    90%{ transform:translateX(5px); }
        }
        .ui-content{
            position: absolute;
            left: 50px;
            right: 50px;
            top: 50px;
            bottom: 50px;
            z-index: 100;
            text-align: center;
        }
        .ui-title{
            position: absolute;
            top: -200px;
            opacity: 0;
            width: 100%;
            text-align: center;
            transition: all 0.5s ease 0.1s;
            font-size: 20px;
            font-weight: 800;
            color: #fff;

        }
         .author{
            position: absolute;
            bottom: -200px;
            opacity: 0;
            width: 100%;
            text-align: center;
            font-size: 16px;
            color: #fff;
            transition: all 0.5s ease 0.2s;
        }
        .ui-content-box:hover .ui-title{
            top: 40px;
            opacity: 1;
        }
        .ui-content-box:hover .author{
            bottom: 50px;
            opacity: 1;
        }
        </style>
</head>
<body>
    <div class="ui-content-wapper">
        <div class="ui-content-box">
            <img src="./images/img-1.jpg" alt="">
            <div class="ui-content">
                <div class="ui-title">动画</div>
                <div class="author">佚名</div>
            </div>
        </div>
        <div class="ui-content-box">
                <img src="./images/img-2.jpg" alt="">
                <div class="ui-content">
                    <div class="ui-title">动画</div>
                    <div class="author">佚名</div>
                </div>
        </div>
        <div class="ui-content-box">
                <img src="./images/img-3.jpg" alt="">
                <div class="ui-content">
                    <div class="ui-title">动画</div>
                    <div class="author">佚名</div>
                </div>
        </div>
    </div>
</body>
</html>